<template>
  <div class="enroll">
    报名表单

    <van-cell-group title="参赛人信息">
      <van-field
        :value="formData.realname"
        required
        clearable
        label="姓名"
        icon="question-o"
        placeholder="请输入参赛人姓名"
        bind:click-icon="onClickIcon"
      />
      <van-field
        :value="formData.mobile"
        label="手机号"
        type="number"
        placeholder="请输入手机号"
        error-message="手机号格式错误"
      />
      <van-field
        :value="formData.idcardno"
        type="idcard"
        label="证件号码"
        placeholder="请输入证件号码"
        required
        :border="false"
      />
    </van-cell-group>
  </div>
</template>

<script>
import navbar from '@/components/navbar'
import card from '@/components/card'
export default {
  props: ['text'],
  components: {
    navbar,
    card
  },

  data () {
    return {
      id: 0,
      formData: {
        realname: '',
        mobile: '',
        idc_type: '',
        idcardno: '',
        birthday: '',
        gender: '',
        blood_type: '',
        country: '',
        nation: '',
        area: '',
        address_detail: '',
        linkman: {
          name: '',
          mobile: ''
        },
        cloth_size: '',
        extras: {}
      },
      title: '导航栏',
      titleColor: '#000000',
      value: ''
    }
  },
  onLoad (option) {
    this.id = option.id
    console.log('entryform onLoad option', option)
    console.log('小程序 [page-blog] 生命周期: onLoad: 监听页面加载')
  },
  // 跳转后页面
  mounted () {
    console.log(this.id)
  },
  created () {
    console.log('entryform created')
  },
  methods: {
    onSearch () {
      console.log('onSearch', this.value)
    }
  }
}
</script>

<style>
.search-warp {
  text-align: center;
  margin-top: 100px;
}
</style>
